//
//  WorkHomeVC.m
//  XLDoctor
//
//  Created by longma on 2018/7/27.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import "ReplaceResultsAlertView.h"
@interface ReplaceResultsAlertView ()

@property (weak, nonatomic) IBOutlet MJUIAlertVCBaseView *baseAlertView;
@property (weak, nonatomic) IBOutlet UIView *contentview;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentviewH;

@property (weak, nonatomic) IBOutlet UIButton *cancelButton;
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@property (weak, nonatomic) IBOutlet UILabel *oldValueLabel;
@property (weak, nonatomic) IBOutlet UILabel *oldUnitLabel;

@property (weak, nonatomic) IBOutlet UILabel *nValueVLabel;
@property (weak, nonatomic) IBOutlet UILabel *nUnitLabel;
@property (weak, nonatomic) IBOutlet UILabel *abbrLabel;

@end

@implementation ReplaceResultsAlertView
#pragma mark - 系统


- (void)viewDidLoad {
    [super viewDidLoad];

    [self.baseAlertView initContentview:self.contentview];
    
    self.oldValueLabel.text = self.oldDetectionValueModel.value;
    self.oldUnitLabel.text = self.oldDetectionValueModel.unit;
    
    self.nValueVLabel.text = self.nDetectionValueModel.value;
    self.nUnitLabel.text = self.nDetectionValueModel.unit;
    
    self.abbrLabel.mj_localizable = self.nDetectionValueModel.abbr;
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];

}

- (IBAction)handleConfirmButtonButtonEvent:(UIButton *)sender {

    MJWeakSelf
    [self dismissViewControllerAnimated:false completion:^{
        if(weakSelf.confirmBlock){
            weakSelf.confirmBlock();
        }
    }];
}

- (IBAction)handleCancelButtonButtonEvent:(UIButton *)sender {

    [self dismissViewControllerAnimated:false completion:^{
       
    }];
}


@end
